package com.example.a2032.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.a2032.R;
import com.example.a2032.Utils.Utils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ResetActivity extends BaseActivity {

    @BindView(R.id.iv_title)
    ImageView ivTitle;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_bg_mode)
    ImageView ivBgMode;
    @BindView(R.id.RadioButton_12)
    ImageView RadioButton12;
    @BindView(R.id.RadioButton_24)
    ImageView RadioButton24;
    @BindView(R.id.tv_timeMode)
    TextView tvTimeMode;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_reset);
        ButterKnife.bind(this);
        init();
    }

    private void init() {
        String title = getIntent().getStringExtra(SettingActivity.KEY_SettingTitle);
        tvTitle.setText(title);
    }

    @OnClick(R.id.iv_title)
    public void onViewClicked() {
        finish();
    }

    @OnClick({R.id.RadioButton_12, R.id.RadioButton_24})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.RadioButton_12:
                shutdown();
                break;
            case R.id.RadioButton_24:
                finish();
                break;
        }
    }
    public  void shutdown() {
        Utils.shutdown(this);
    }
}